package cn.sciento.transfer.infra.repository.impl;

import cn.sciento.core.domain.Page;
import io.choerodon.mybatis.pagehelper.PageHelper;
import io.choerodon.mybatis.pagehelper.domain.PageRequest;
import java.util.List;
import cn.sciento.mybatis.base.impl.BaseRepositoryImpl;
import cn.sciento.transfer.domain.entity.DataChkBatch;
import cn.sciento.transfer.domain.entity.DataChkBatchLine;
import cn.sciento.transfer.domain.repository.DataChkBatchRepository;
import cn.sciento.transfer.infra.mapper.DataChkBatchMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class DataChkBatchRepositoryImpl extends BaseRepositoryImpl<DataChkBatch> implements DataChkBatchRepository {
  @Autowired
  private DataChkBatchMapper dataChkBatchMapper;
  
  public Page<DataChkBatchLine> pageDataChk(PageRequest pageRequest, DataChkBatchLine dataChkBatchLine) {
    return PageHelper.doPageAndSort(pageRequest, () -> this.dataChkBatchMapper.listDataChk(dataChkBatchLine));
  }
}
